package helloworld.delegate.course;

import helloworld.exception.DuplicateCourseException;
import helloworld.admin.bean.*;
import helloworld.admin.service.course.CourseControllerService;
import helloworld.admin.service.course.CourseServiceException;
/**
 *
 * @author Tuyen-DM 
 * @version $Revision:   $ $Date: 2009/05/09  $
 */
public class CourseDelegate {

	public CourseAdminBean getCourseDetail(String courseName) throws CourseServiceException{
		CourseControllerService centService = new CourseControllerService();
		return centService.getCourseDetail(courseName);
	}
	
	public int createCourse(CourseAdminBean course)throws CourseServiceException,DuplicateCourseException{
		CourseControllerService centService = new CourseControllerService();
		return centService.createCourse(course);
	}
	
	public void updateCourse(CourseAdminBean course)throws CourseServiceException,DuplicateCourseException{
		CourseControllerService centService = new CourseControllerService();
		centService.updateCourse(course);
	}
	
	public void deleteCourse(int id)throws CourseServiceException{
		CourseControllerService centService = new CourseControllerService();
		centService.deleteCourse(id);
	}
}
